using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace OnlineAnadolu
{
    public class Database
    {
        public DataTable select(string query_select)
        {
           
            SqlConnection con2 = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["shoppingConnectionString"].ToString());
            SqlCommand cmd2 = new SqlCommand(query_select, con2);
            SqlDataAdapter ad2 = new SqlDataAdapter(cmd2);
            DataTable dt2 = new DataTable();
            ad2.Fill(dt2);
            return dt2;
        }
        public void insert(string query_insert)
        {
            SqlConnection con2 = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["shoppingConnectionString"].ToString());
            con2.Open();
            SqlCommand cmd2 = new SqlCommand(query_insert, con2);
            cmd2.ExecuteNonQuery();
            con2.Close();
        }
    }
}
